﻿<Window x:Class="Gao.Poker.App.Win.MemberManageWin"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="会员管理" WindowStartupLocation="CenterScreen" ResizeMode="NoResize" Width="900">
    <Grid Margin="5">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="450"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="30"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <StackPanel Margin="0" Orientation="Horizontal" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2">
            <Button Content="充值" Name="btnRecharge" Click="Recharge_Click" HorizontalAlignment="Left" Style="{DynamicResource MyButton}" Width="101" Height="25" />
            <Border BorderBrush="#CCFFFFFF" BorderThickness="1,0,0,0" HorizontalAlignment="Left"  Width="2.5" Background="#FFB6B6B6"/>
        </StackPanel>
    
        <Border  Grid.Column="0" Grid.Row="1" BorderBrush="White" BorderThickness="0,1" Margin="0,1,0,0">
            <Border.Background>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#A1C7CFDA" Offset="0.991"/>
                    <GradientStop Color="#B5F1F1F1"/>
                    <GradientStop Color="#FFD2D2D2" Offset="1"/>
                </LinearGradientBrush>
            </Border.Background>
            
            <StackPanel Orientation="Vertical" Width="450">
                <StackPanel Orientation="Horizontal" Margin="5">
                    <TextBlock Text="姓名：" Margin="10,5,0,5"/>
                    <TextBox Text="{Binding Path=MemberName}" Width="100" Margin="0,5,0,5"/>
                    <TextBlock Text="会员号：" Margin="5,5,0,5"/>
                    <TextBox Text="{Binding Path=MemberCardNo}" Margin="0,5,0,5" Width="100"/>
                    <Button x:Name="btnSearch" Margin="80,5,5,5" Width="45" Style="{DynamicResource Orrange}" Content="查询" RenderTransformOrigin="0.491,0.394" />
                </StackPanel>
                <DataGrid Margin="1,1,1.2,1" VerticalAlignment="Top" RowHeight="30" AutoGenerateColumns="False"
                      SelectionMode="Single"  CanUserAddRows="True" CellStyle="{StaticResource Body_Content_DataGrid_Centering}"
                      AlternatingRowBackground="Gainsboro" ItemsSource="{Binding Path=Members}" SelectedItem="{Binding Path=Member}" AlternationCount="2" IsReadOnly="True"
                      FontSize="16" Name="dgMembers">
                    <DataGrid.Columns>
                        <DataGridTextColumn Header="ID" Width="40" HeaderStyle="{StaticResource CenterAlignmentColumnHeaderStyle}" Binding="{Binding Path=ID}"/>
                        <DataGridTextColumn Header="卡号" Width="120" HeaderStyle="{StaticResource CenterAlignmentColumnHeaderStyle}" Binding="{Binding Path=CardNo}"/>
                        <DataGridTextColumn Header="姓名" Width="80" HeaderStyle="{StaticResource CenterAlignmentColumnHeaderStyle}" Binding="{Binding Path=Name}"/>
                        <DataGridTextColumn Header="手机号" Width="100" HeaderStyle="{StaticResource CenterAlignmentColumnHeaderStyle}" Binding="{Binding Path=Telephone}"/>
                        <DataGridTextColumn Header="积分" Width="*" HeaderStyle="{StaticResource CenterAlignmentColumnHeaderStyle}" Binding="{Binding Path=Points}"/>
                    </DataGrid.Columns>
                </DataGrid>
            </StackPanel>
        </Border>
        
        <TabControl Margin="5,5,5,5.2" Grid.Column="1" Grid.Row="1">
            <TabItem Header="比赛记录">
                <DataGrid Margin="1" VerticalAlignment="Top" RowHeight="30" AutoGenerateColumns="False"
                    SelectionMode="Single"  CanUserAddRows="True" CellStyle="{StaticResource Body_Content_DataGrid_Centering}"
                    AlternatingRowBackground="Gainsboro" ItemsSource="{Binding MembersGameRecords}"  AlternationCount="2" IsReadOnly="True"
                    FontSize="16" >
                    <DataGrid.Columns>
                        <DataGridTextColumn Header="比赛名称" Width="*" HeaderStyle="{StaticResource CenterAlignmentColumnHeaderStyle}" Binding="{Binding Path=GameName}"/>
                        <DataGridTextColumn Header="名次" Width="40" HeaderStyle="{StaticResource CenterAlignmentColumnHeaderStyle}" />
                        <DataGridTextColumn Header="买入" Width="40" HeaderStyle="{StaticResource CenterAlignmentColumnHeaderStyle}" Binding="{Binding Path=BuyNumber}"/>
                        <DataGridTextColumn Header="重新买入" Width="80" HeaderStyle="{StaticResource CenterAlignmentColumnHeaderStyle}" Binding="{Binding Path=BuyAgainNumber}"/>
                        <DataGridTextColumn Header="最后买入" Width="80" HeaderStyle="{StaticResource CenterAlignmentColumnHeaderStyle}" Binding="{Binding Path=BuyLastNumber}"/>
                        <DataGridTextColumn Header="买入金额" Width="80" HeaderStyle="{StaticResource CenterAlignmentColumnHeaderStyle}" Binding="{Binding Path=BuyMoney}"/>
                    </DataGrid.Columns>
                </DataGrid>
            </TabItem>
            <TabItem Header="会员基本信息">
                <Grid Margin="5">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="90"/>
                        <ColumnDefinition Width="300"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="30"/>
                        <RowDefinition Height="30"/>
                        <RowDefinition Height="30"/>
                        <RowDefinition Height="30"/>
                        <RowDefinition Height="30"/>
                        <RowDefinition Height="30"/>
                        <RowDefinition Height="30"/>
                        <RowDefinition Height="30"/>
                        <RowDefinition Height="30"/>
                        <RowDefinition Height="30"/>
                        <RowDefinition Height="85"/>
                        <RowDefinition Height="50"/>
                    </Grid.RowDefinitions>

                    <TextBlock Text="卡号：" Margin="1" Grid.Column="0" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                    <TextBlock Text="{Binding Path=Member.CardNo}" Margin="1" Grid.Column="1" VerticalAlignment="Center" Grid.Row="0"/>

                    <TextBlock Text="姓名："  Margin="1" VerticalAlignment="Center" Grid.Column="0" Grid.Row="1" HorizontalAlignment="Right"/>
                    <TextBlock Text="{Binding Path=Member.Name}" Margin="1" VerticalAlignment="Center"  Grid.Column="1" Grid.Row="1"/>

                    <TextBlock Text="生日：" HorizontalAlignment="Right" Margin="1" VerticalAlignment="Center" Grid.Column="0" Grid.Row="2"/>
                    <TextBlock Margin="1" VerticalAlignment="Center" Grid.Column="1" Grid.Row="2" Text="{Binding Member.Birthday, StringFormat='yyyy-MM-dd'}"/>

                    <TextBlock Text="电话：" HorizontalAlignment="Right" Margin="1" VerticalAlignment="Center" Grid.Column="0" Grid.Row="3"/>
                    <TextBlock Text="{Binding Member.Telephone}" Margin="1" VerticalAlignment="Center" Grid.Column="1" Grid.Row="3"/>

                    <TextBlock Text="E-Mail：" HorizontalAlignment="Right" Margin="1" VerticalAlignment="Center" Grid.Column="0" Grid.Row="4"/>
                    <TextBlock Text="{Binding Member.Email}" Margin="1" VerticalAlignment="Center" Grid.Column="1" Grid.Row="4"/>

                    <TextBlock Text="消费金额：" HorizontalAlignment="Right" Margin="1" VerticalAlignment="Center" Grid.Column="0" Grid.Row="5"/>
                    <TextBlock Text="{Binding Member.ConsumeMoney}" Margin="1" VerticalAlignment="Center" Grid.Column="1" Grid.Row="5"/>

                    <TextBlock Text="积分：" HorizontalAlignment="Right" Margin="1" VerticalAlignment="Center" Grid.Column="0" Grid.Row="6"/>
                    <TextBlock Text="{Binding Member.Points}" Margin="1" VerticalAlignment="Center" Grid.Column="1" Grid.Row="6"/>

                    <TextBlock Text="地址：" HorizontalAlignment="Right" Margin="1" VerticalAlignment="Center" Grid.Column="0" Grid.Row="7"/>
                    <TextBlock Text="{Binding Member.Address}" Margin="1" VerticalAlignment="Center" Grid.Column="1" Grid.Row="7"/>

                    <TextBlock Text="身份证：" HorizontalAlignment="Right" Margin="1" VerticalAlignment="Center" Grid.Column="0" Grid.Row="8"/>
                    <TextBlock Text="{Binding Member.IdNo}" Margin="1" VerticalAlignment="Center" Grid.Column="1" Grid.Row="8"/>

                    <TextBlock Text="开卡时间：" HorizontalAlignment="Right" Margin="1" VerticalAlignment="Center" Grid.Column="0" Grid.Row="9"/>
                    <TextBlock Text="{Binding Member.OpenCardDate, StringFormat='yyyy-MM-dd hh:mm:ss'}"  VerticalAlignment="Center"  Margin="1" Grid.Column="1" Grid.Row="9"/>

                    <TextBlock Text="备注：" HorizontalAlignment="Right" Margin="1" Grid.Column="0" Grid.Row="10"/>
                    <TextBlock Text="{Binding Member.Remark, Mode=TwoWay}" Margin="1" VerticalAlignment="Top" Grid.Column="1" Grid.Row="10" Height="80"/>

                </Grid>
            </TabItem>
        </TabControl>

    </Grid>
</Window>
